package com.guge.sports.controller;


import com.guge.sports.entity.Dto.StSchoolDto;
import com.guge.sports.entity.StClass;
import com.guge.sports.service.StClassService;
import com.guge.sports.toolPackage.base.BaseController;
import com.guge.sports.toolPackage.utils.MyPager;
import com.guge.sports.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author testjava
 * @since 2022-09-14
 */
@Api(description = "班级接口")
@RestController
@RequestMapping("/sports/st-class")
public class StClassController extends BaseController<StClass> {

    @Autowired
    private StClassService stClassService;

    @ApiOperation(value = "获取年级列表")
    @PostMapping("/getClassList")
    public R getClassList(MyPager<StClass> myPager, @RequestBody(required = false) StClass stClass) {
        MyPager<StClass> options = stClassService.getClassList(myPager,stClass);
        return R.ok().data("depts", options);
    }

}

